home *** CD-ROM | disk | FTP | other *** search
/ Clinton - Portrait of Victory / PORTRAIT OF VICTORY.BIN / clntpc16 / eagle33.txt < prev    next >
Text File  |  1992-12-28  |  10KB  |  559 lines

  1. ; The On the Road main menu
  2. start33:
  3. pload ehroa 1
  4. cfade 9 0 414 p1
  5. pfree 1
  6. pload ecsq03 1
  7. cfade 9 0 87 p1
  8. pfree 1
  9. pload ebcams 1
  10. cfade 9 0 29 p1
  11. pfree 1
  12. if @tnum<>0
  13.   cload ebnav 1 1
  14.   cfade 9 0 0 1
  15.   cfree 1
  16. endif
  17. menu33:
  18. set gonum 33
  19. mn33:
  20. waitkey
  21. getkey k
  22. if @k==1
  23.   set num 1
  24.   goto menu331
  25. else
  26.   if @k==2
  27.     set title "ehpa03"
  28.     set tnum 59
  29.     set first 117
  30.     set last 175
  31.     set back "eagle33"
  32.     link eagle41
  33.   else
  34.     if @k==3
  35.       xbkg
  36.       set num 1
  37.       goto menu332
  38.     else
  39.       if @k==chr(104)||@k==chr(72)
  40.         goto help
  41.       else
  42.         if @k==chr(112)||@k==chr(80)
  43.           xbkg2
  44.           link eagle3 menubk
  45.         else
  46.           if @k==chr(101)||@k==chr(69)
  47.             xbkg
  48.             pload edexit 1
  49.             cfade 9 192 201 p1
  50.             pfree 1
  51.             mn33b:
  52.             waitkey
  53.             getkey k
  54.             if @k==chr(13)
  55.               exit
  56.             else
  57.               if @k==chr(27)
  58.                 xbkg
  59.                 pload ecsq03 1
  60.                 cfade 9 0 87 p1
  61.                 pfree 1
  62.                 goto menu33
  63.               else
  64.                 goto mn33b
  65.               endif
  66.             endif
  67.           else
  68.             goto mn33
  69.           endif
  70.         endif
  71.       endif
  72.     endif
  73.   endif
  74. endif
  75.  
  76. ; Photo and Audio Introduction selection display
  77. menu331:
  78. set gonum 331
  79. set abort on
  80. mn331:
  81. pload menum 1
  82. pfade 9 1
  83. pfree 1
  84. pload roap$@num 1
  85. set px (639-p1->xsize)/2
  86. if @px%8<>0
  87.   if @px%8<5
  88.     set px @px-(@px%8)
  89.   else
  90.     set px @px+(8-@px%8)
  91.   endif
  92. endif
  93. set py 67+((355-p1->ysize)/2)
  94. cfade 9 @px @py p1
  95. pfree 1
  96.   set m ""
  97.   if @num==1
  98.     cdplay 19 11
  99.     timer
  100.     waitkey 1100
  101.   endif
  102.   if @num==2
  103.     cdplay 20 14
  104.     timer
  105.     waitkey 1400
  106.   endif
  107.   if @num==3
  108.     cdplay 21 9
  109.     timer
  110.     waitkey 900
  111.   endif
  112.   if @num==4
  113.     cdplay 22 11
  114.     timer
  115.     waitkey 1100
  116.   endif
  117.   if @num==5
  118.     cdplay 23 14
  119.     timer
  120.     waitkey 1400
  121.   endif
  122.   if @num==6
  123.     cdplay 24 10
  124.     timer
  125.     waitkey 1000
  126.   endif
  127.   getkey m
  128.   xstop
  129.   cdstop
  130. if @num==6
  131.   pload ebkg 1
  132.   pfade 9 1
  133.   pfree 1
  134.   set tnum 1
  135.   set abort off
  136.   goto start33
  137. else
  138.   set num @num+1
  139.   goto mn331
  140. endif
  141.  
  142. ; Milestones text selection display
  143. menu332:
  144. set gonum 332
  145. mn332:
  146. pload etxtx 1
  147. cfade 9 40 95 p1
  148. pfree 1
  149. color 15
  150. fload times15 1
  151. fgaps 1 5 3
  152. set buf readfile(roamt$@num$.doc)
  153. window 60 95 580 390
  154. text @@buf
  155. . farfree(@buf)
  156. window
  157. set center on
  158. ffree 1
  159. fload ibm8 1
  160. text 0 115 "Page "$@num$" of 5"
  161. text 0 105 "Press <PGUP> for next or <PGDN> for prior."
  162. set center off
  163. ffree 1
  164. mn332b:
  165. waitkey
  166. getkey k
  167. if @k==1
  168.   set num 1
  169.   goto menu331
  170. else
  171.   if @k==2
  172.     set title "ehpa03"
  173.     set tnum 59
  174.     set first 117
  175.     set last 175
  176.     set back "eagle33"
  177.     link eagle41
  178.   else
  179.     if @k==chr(104)||@k==chr(72)
  180.       goto help
  181.     else
  182.       if @k==chr(112)||@k==chr(80)
  183.         xbkg2
  184.         link eagle3 menubk
  185.       else
  186.         if @k==chr(101)||@k==chr(69)
  187.           xbkg
  188.           pload edexit 1
  189.           cfade 9 192 201 p1
  190.           pfree 1
  191.           mn332c:
  192.           waitkey
  193.           getkey k
  194.           if @k==chr(13)
  195.             exit
  196.           else
  197.             if @k==chr(27)
  198.               xbkg
  199.               goto mn332
  200.             else
  201.               goto mn332c
  202.             endif
  203.           endif
  204.         else
  205.           if @k==chr(73)$chr(1)||@k==chr(72)$chr(1)
  206.             if @num==5
  207.               set num 1
  208.               goto mn332
  209.             else
  210.               set num @num+1
  211.               goto mn332
  212.             endif
  213.           else
  214.             if @k==chr(81)$chr(1)||@k==chr(80)$chr(1)
  215.               if @num==1
  216.                 set num 5
  217.                 goto mn332
  218.               else
  219.                 set num @num-1
  220.                 goto mn332
  221.               endif
  222.             else
  223.               goto mn332b
  224.             endif
  225.           endif
  226.         endif
  227.       endif
  228.     endif
  229.   endif
  230. endif
  231.  
  232. help:
  233. pload apatch 1
  234. cfade 9 0 0 p1
  235. pfree 1
  236. pload eclbb 1
  237. cfade 9 0 29 p1
  238. pfree 1
  239. xbkg
  240. pload edhelp 1
  241. cfade 9 32 74 p1
  242. pfree 1
  243. fload ibm8 1
  244. fgaps 1 4 2
  245. set buf readfile(roadhlp.doc)
  246. window 65 345 575 100
  247. color 1
  248. text @@buf
  249. . farfree(@buf)
  250. window
  251. ffree 1
  252. hlp1:
  253. waitkey
  254. getkey k
  255. if @k==chr(13)
  256.   if @gonum==33
  257.     xbkg
  258.     pload ecsq03 1
  259.     cfade 9 0 87 p1
  260.     pfree 1
  261.     pload ebcams 1
  262.     cfade 9 0 29 p1
  263.     pfree 1
  264.     cload ebnav 1 1
  265.     cfade 9 0 0 1
  266.     cfree 1
  267.     goto menu33
  268.   else
  269.     xbkg
  270.     pload ebcams 1
  271.     cfade 9 0 29 p1
  272.     pfree 1
  273.     cload ebnav 1 1
  274.     cfade 9 0 0 1
  275.     cfree 1
  276.     goto menu$@gonum
  277.   endif
  278. else
  279.   goto hlp1
  280. endif
  281.  
  282. xbkg:
  283. cload ebkgx 1 1
  284. cfade 9 0 68 1
  285. cfree 1
  286. return
  287.  
  288. xbkg2:
  289. pload eclbb 1
  290. cfade 9 0 29 p1
  291. pfree 1
  292. cload ebkgx 1 1
  293. cfade 9 0 68 1
  294. cfree 1
  295. pload eclhx 1
  296. cfade 9 0 414 p1
  297. pfree 1
  298. return
  299.  
  300. xStop:
  301. if len(@m)
  302.         cdstop
  303.     pload ebkg 1
  304.     pfade 9 1
  305.     pfree 1    
  306.         set tnum 1
  307.         set abort off
  308.     pop start33
  309. else
  310.     return
  311. endif
  312.  
  313. ;
  314. ;    CDINIT
  315. ;
  316. ;    Check for CD-ROM driver and setup @drive
  317. ;
  318. cdinit:
  319.     int 0x2f 0x1500,0
  320.     if @bx
  321.         global drive chr(@cx+asc("A"))
  322.     else
  323.         global drive ""
  324.     endif
  325.     return
  326.  
  327. cdplay:
  328.     cdtrack    @1 @3 @4 @5
  329.     cdcmd    132,@0,@2*75
  330.     cdcheck    @0,cdplay
  331.     return
  332.  
  333. ;
  334. ;    CDPLAYTO TRACK MINUTES SECONDS FRAMES TRACK MINUTES SECONDS FRAMES
  335. ;
  336. ;
  337. cdplayto:
  338.     cdtrack    @1 @2 @3 @4
  339.     local    begin @0
  340.     cdtrack    @5 @6 @7 @8
  341.     local    end @0
  342.     cdcmd    132,@begin,@end-@begin
  343.     cdcheck    @0,cdplayto
  344.     return
  345.  
  346. ;
  347. ;    CDSTOP
  348. ;
  349. ;    Stop playing immediately
  350. ;
  351. cdstop:
  352.     cdcmd    133,0,0
  353.     cdcheck    @0,cdstop
  354.     return
  355.  
  356. ;
  357. ;    CDRESUME
  358. ;
  359. ;    Resume playing from where we issued a CDSTOP
  360. ;
  361. cdresume:
  362.     cdcmd    136,0,0
  363.     cdcheck    @0,cdresume
  364.     return
  365.  
  366. ;
  367. ;    CDSEEK TRACK {MINUTES SECONDS FRAMES}
  368. ;
  369. ;    Seek the CD player head to a track to minimize play startup time.
  370. ;    Parameters are the same as CDPLAY.
  371. ;
  372. cdseek:
  373.     cdtrack @1 @2 @3 @4
  374.     cdcmd 131,@0,0
  375.     cdcheck    @0,cdseek
  376.     return
  377.  
  378. ;
  379. ;    CDEJECT
  380. ;
  381. ;    Open the CD drive's tray/door
  382. ;
  383. cdeject:
  384.     local    buf ofs("1")
  385.     local    bseg seg(@buf);
  386.     poke    @bseg @buf 0                ;Eject Disk
  387.     cdcmd    12,@buf|(@bseg<<16),1            ;WRITE IOCTL Output
  388.     cdcheck    @0,cdeject
  389.     return
  390.  
  391. ;
  392. ;    CDCLOSE
  393. ;
  394. ;    Close the CD drive's tray/door
  395. ;
  396. cdclose:
  397.     local    buf ofs("1")
  398.     local    bseg seg(@buf);
  399.     poke    @bseg @buf 5                ;Close Tray
  400.     cdcmd    12,@buf|(@bseg<<16),1            ;WRITE IOCTL Output
  401.     cdcheck    @0,cdclose
  402.     return
  403.  
  404.  
  405. ;
  406. ;    CDSTATUS
  407. ;
  408. ;    Return CD Drive status and setup global variables @first and @last
  409. ;
  410. cdstatus:
  411.     local    buf ofs("123456")
  412.     local    bseg seg(@buf);
  413.     poke    @bseg @buf 10                ;Audio Disk Info
  414.     cdcmd    3,@buf|(@bseg<<16),6            ;READ IOCTL Input
  415.     cdcheck    @0,cdstatus
  416.     global    first peek(@bseg,@buf+1)+0
  417.     global    last  peek(@bseg,@buf+2)+0
  418.     poke    @bseg @buf 6                ;Device status
  419.     cdcmd    3,@buf|(@bseg<<16),5            ;READ IOCTL Input
  420.     cdcheck    @0,cdstatus
  421.     return    peekl(@bseg,@buf+1)
  422.  
  423. ;
  424. ;    CDTRACK TRACK MINUTES SECONDS FRAMES
  425. ;
  426. ;    Return the absolute sector number of a track
  427. ;
  428. cdtrack:
  429.     local    buf ofs("1234567")
  430.     local    bseg seg(@buf);
  431.     poke    @bseg @buf 11                ;Get Audio Track Info
  432.     poke    @bseg @buf+1 @1             ;track number
  433.     cdcmd    3,@buf|(@bseg<<16),7            ;READ IOCTL Input
  434.     cdcheck    @0,cdtrack
  435.     return    peekl(@bseg,@buf+2)+(@2*60+@3)*75+@4    ;return track address
  436.  
  437.  
  438. cdcmd:
  439.     local req ofs("12345678901234567890123456")
  440.     local rseg seg(@req)
  441.     poke  @rseg @req 13                ;param length
  442.     poke  @rseg @req+1 0                ;subunit
  443.     poke  @rseg @req+2 @1                ;command code
  444.     pokew @rseg @req+3 0                ;status
  445.     pokel @rseg @req+5 0 0                ;reserved
  446.     poke  @rseg @req+13 1                ;address mode
  447.     pokel @rseg @req+14 @2                ;begin
  448.     pokel @rseg @req+18 @3                ;length
  449.     pokel @rseg @req+22 0                ;reserved
  450.     int 0x2f 0x1510,@req,asc(@drive)-asc("A"),,,,,seg(@req)
  451.     if peek(@rseg,@req+4)&0x80
  452.         databegin
  453.             "Unknown Error"
  454.             "Write-protect violation"
  455.             "Unknown unit"
  456.             "Drive not Ready"
  457.             "Unknown command"
  458.             "CRC error"
  459.             "Bad drive request structure length"
  460.             "Seek Error"
  461.             "Unknown media"
  462.             "Sector not found"
  463.             "Printer out of paper"